package com.ngc.mall.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ngc.mall.domain.SpuDomain;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface SpuMapper extends BaseMapper<SpuDomain> {

    @Select("select * from spu where title like %#{q}% or sub_title like %#{q}%")
    List<SpuDomain> findByTitleLikeAndSubTitleLike(String q);
}
